package com.grape.grapeboot.config;

import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;

/**
 * 描述:SpittrWebAppInitializer  加载SpringMVCDispatcherServlet
 * @author: myx
 * @date: 2019/7/8 0008
 * Copyright © 2019-grape. All rights reserved.
 */
public class SpittrWebAppInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {

	// 加载根配置信息 spring核心
	protected Class<?>[] getRootConfigClasses() {
		return new Class[] { RootConfig.class };
	}

	// 加载SpringMVC容器
	protected Class<?>[] getServletConfigClasses() {
		return new Class[] { WebConfig.class };
	}

	// springmvc 拦截url映射 拦截所有请求
	protected String[] getServletMappings() {
		return new String[] { "/" };
	}
}